package String;

public class reverse_String {
    public String reverseString(String iniString){
        int len=iniString.length();
        char[] charArr=new char[len];
        for(int i=0;i<len;i++){
            charArr[i]=iniString.charAt(len-i-1);
        }
        return new String(charArr);
    }
    public String reverseString_02(String iniString){
        StringBuilder stringBuilder=new StringBuilder(iniString);
        return stringBuilder.reverse().toString();

    }
    public static void main(String[] args) {
        reverse_String rS=new reverse_String();
        System.out.println(rS.reverseString_02("This is newcoder"));
    }
}
